package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

/**
 * 
 * @TableName drug_template
 */
@TableName(value ="drug_template")
public class DrugTemplate {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Template name
     */
    @TableField(value = "name")
    private String name;

    /**
     * Doctor ID
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * Creation time
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * Scope (hospital/department/personal)
     */
    @TableField(value = "scope")
    private String scope;

    /**
     * Delete flag
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Template name
     */
    public String getName() {
        return name;
    }

    /**
     * Template name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Doctor ID
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * Doctor ID
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * Creation time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * Creation time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * Scope (hospital/department/personal)
     */
    public String getScope() {
        return scope;
    }

    /**
     * Scope (hospital/department/personal)
     */
    public void setScope(String scope) {
        this.scope = scope;
    }

    /**
     * Delete flag
     */
    public Integer getIsDeleted() {
        return isDeleted;
    }

    /**
     * Delete flag
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DrugTemplate other = (DrugTemplate) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getScope() == null ? other.getScope() == null : this.getScope().equals(other.getScope()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getScope() == null) ? 0 : getScope().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", userId=").append(userId);
        sb.append(", createTime=").append(createTime);
        sb.append(", scope=").append(scope);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append("]");
        return sb.toString();
    }
}